<div class="primary">
    <?php include_once('../includes/inc_featured.php');?>
    <div class="main-content">
        <div class="main-content-left">
        <?php
        foreach($arr_cat as $cat) {
            ?>
            <div class="home-news-box">
                <div class="home-news-box-tab">
                    <h3><?=$cat['cat_name']?></h3>
                </div><!-- End home-news-box-tab -->
                <div class="home-news-box-main">
            <?
            $list_news_cat = list_news_cat($cat['cat_id']);
            foreach($list_news_cat as $key=>$news_cat) {
                if($key == 0) {
                    ?>
                    <div class="home-news-box-item first-no-margin-left">
                        <div class="img">
                            <a href="<?=generate_detail_url($news_cat)?>">
                                <img alt="<?=$news_cat['new_title']?>" src="<?=$news_cat['new_picture']?>" />
                            </a>
                        </div>
                        <a href="<?=generate_detail_url($news_cat)?>"><h2><?=$news_cat['new_title']?></h2></a>
                    </div><!-- End home-news-box-item -->
                    <?
                }elseif($key > 0 && $key < 5) {
                    ?>
                    <div class="home-news-box-item">
                        <div class="img">
                            <a href="<?=generate_detail_url($news_cat)?>">
                                <img alt="<?=$news_cat['new_title']?>" src="<?=$news_cat['new_picture']?>" />
                            </a>
                        </div>
                        <a href="<?=generate_detail_url($news_cat)?>"><h2><?=$news_cat['new_title']?></h2></a>
                    </div><!-- End home-news-box-item -->
                    <?
                }elseif($key == 5) {
                    ?>
                    <div class="home-news-box-list">
                        <ul>
                            <li><a href="<?=generate_detail_url($news_cat)?>"><h3><?=$news_cat['new_title']?></h3></a></li>
                    <?
                }else {
                    ?>
                            <li><a href="<?=generate_detail_url($news_cat)?>"><h3><?=$news_cat['new_title']?></h3></a></li>
                    <?
                }
            }
            if(count($list_news_cat) >= 6) {
                ?>
                    </ul>
                    </div><!-- End home-news-box-list -->
                <?
            }
            ?>          
                </div><!-- End home-news-box-main -->
            </div><!-- End home-news-box -->
            <?
        }
        ?>
        </div><!-- End main-content-left -->
        <div class="main-content-right">
            <img style="width: 100%" alt="quang cao" src="../themes/img/adv2.jpg" />
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->